package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class BabyQRCodeRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/scan_qrcode";

    private String member;

    private String qrCode;

    public String getMember() {
        return member;
    }

    public void setMember(String member) {
        this.member = member;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        BabyQRCodeRequestBody body = new BabyQRCodeRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setMember(member);
        body.setQrCode(qrCode);
        return body;
    }

    private class BabyQRCodeRequestBody extends BaseTokenRequestBody {

        @SerializedName("UserMemberName")
        private String member;

        @SerializedName("QRCodeName")
        private String qrCode;

        private BabyQRCodeRequestBody() {
            setSv(BaseRequestConfig.SV_BABY_QRCODE);
        }

        public String getMember() {
            return member;
        }

        public void setMember(String member) {
            this.member = member;
        }

        public String getQrCode() {
            return qrCode;
        }

        public void setQrCode(String qrCode) {
            this.qrCode = qrCode;
        }
    }

}
